package com.example.demo.dao;

import com.example.demo.pojo.DeviceEntity;
import com.example.demo.pojo.MessageEntity;
import com.example.demo.pojo.UserEntity;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
* @author: xuange123
* @time: 2019-08-28 11:28
* @table: user
* @description: 
*/
@Mapper
public interface UserMapper {

    /**
     * @param  entity  table entity
     * @return List<UserEntity>
     *     全部
     */
    List<UserEntity> getByCondition(UserEntity entity);

    /**
     * @param  userId  
     * @return UserEntity
     */
    UserEntity getByUserId(@Param("userId") Integer userId);

    /**
     * @param  entity  table entity
     * @return int
     */
    int insert(UserEntity entity);

    /**
     * @param entity  table entity
     * @return int
     */
    int updateById(UserEntity entity);
    List<UserEntity> getAllUser();
    List<UserEntity> check (@Param("username")String  username ,@Param("password")String password);

    UserEntity getByUsernName(@Param("username")String  username ,@Param("password")String password);
}